#include <stdio.h>

#include <signal.h>
#include <unistd.h>

void sig_handler(int signal_no)
{
	printf("this is usr1 signal handler! %d\n", signal_no);
};

int main()
{
	printf("%d\n", SIGUSR1);
	printf("%d\n", SIGUSR2);

	
	int sig_num = 1;
	for( ; sig_num < 200; ++sig_num)
	{
		if( SIGQUIT == sig_num)
			signal(SIGQUIT, SIG_IGN);
		
		signal(sig_num , sig_handler);
	}

	daemon(1, 1);
	//kill(0, SIGUSR1 + 31);
	for(;;);

	return 0;
}